﻿using System.Collections.ObjectModel;
using System.Windows.Automation;

namespace ProdControls.Interfaces
{
    interface IList
    {
        /// <summary>
        ///   Gets the list of all items.
        /// </summary>
        AutomationElementCollection ListItems { get; }

        /// <summary>
        ///   Gets an array containing all selected items.
        /// </summary>
        AutomationElement[] SelectedItems { get; }

        /// <summary>
        ///   Adds the current element to the collection of selected items.
        /// </summary>
        void AddToSelection(string text);

        /// <summary>
        ///   Adds the current element to the collection of selected items.
        /// </summary>
        /// <param name="index"> The index of the item. </param>
        void AddToSelection(int index);

        /// <summary>
        ///   Removes the current element from the collection of selected items.
        /// </summary>
        void RemoveFromSelection(string text);

        /// <summary>
        ///   Removes the current element from the collection of selected items.
        /// </summary>
        /// <param name="index"> The index of the item. </param>
        void RemoveFromSelection(int index);

        /// <summary>
        ///   Gets the item count.
        /// </summary>
        /// <value> The item count. </value>
        int ItemCount { get; }

        /// <summary>
        ///   Gets the selected item count.
        /// </summary>
        /// <value> The selected item count. </value>
        int SelectedItemCount { get; }
    }
}
